import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.Modifier
import kotlinx.coroutines.launch

@Composable
fun TestBox() {
    val scope = rememberCoroutineScope()
    Box(modifier = Modifier.clickable {
        scope.launch { /*...*/ }
        //clickable函数无@Composable注解，脱离了Composable，所以内部无法使用 LaunchedEffect
//        LaunchedEffect(key1 = "") {}
    })
}
